file(GLOB  SPLITTER_SRC_FILES
    "*.f90"
)

set(sources-splitter-fpp 
    module_splitter_ausm.fpp
    module_splitter_van_leer.fpp
    module_splitter_steger_warming.fpp
    module_splitter_lax_friedrichs.fpp
)
fypp_preprocess("${sources-splitter-fpp}" sources-splitter-postfpp)

include_directories(${PROJECT_SOURCE_DIR}/include)

set(SPLITTER_SRC_FILES ${SPLITTER_SRC_FILES} CACHE STRING INTERNAL)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib/splitter)
set(CMAKE_Fortran_MODULE_DIRECTORY ${PROJECT_SOURCE_DIR}/include/splitter)
add_library(splitter ${SPLITTER_SRC_FILES} ${sources-splitter-postfpp})
target_link_libraries(splitter PkgConfig::PETSC PkgConfig::fortran_stdlib petsc_wrapper eos)
target_include_directories(splitter PUBLIC ${PROJECT_SOURCE_DIR}/include/splitter)
